
#第一种方法
f = open("sample.txt","rt")
for line in f:
    line = line.strip()
    print(line)
f.close()

print("##################################")

#第二种方法
with open("sample.txt","rt") as f:
    for line in f:
        line = line.strip()
        print(line)